package understanding.a7;

/**
 * 没有初始化子类的例子
 * @author yuan
 */
class SuperClass {
    static {
        System.out.println("SuperClass init!");
    }
    public static int value = 123;
}
class SubClass extends SuperClass {
    static {
        System.out.println("SubClass init!");
    }
}
public class EG7_1 {
    public static void main(String[] args) {
        System.out.println(SubClass.value);
    }
}
/* Output:
SuperClass init!
123
 */